if(typeof tb_pathToImage!='string'){ var tb_pathToImage=thickboxL10n.loadingAnimation; } jQuery(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox'); imgLoader=new Image(); imgLoader.src=tb_pathToImage; });function tb_init(domChunk){ jQuery('body').on('click', domChunk, tb_click); } function tb_click(){ var t=this.title || this.name || null; var a=this.href || this.alt; var g=this.rel || false; tb_show(t,a,g); this.blur(); return false; } function tb_show(caption, url, imageGroup){ try { if(typeof document.body.style.maxHeight==="undefined"){ jQuery("body","html").css({height:"100%", width:"100%"});jQuery("html").css("overflow","hidden"); if(document.getElementById("TB_HideSelect")===null){ jQuery("body").append("
"); jQuery("#TB_overlay").click(tb_remove); }}else{ if(document.getElementById("TB_overlay")===null){ jQuery("body").append("
"); jQuery("#TB_overlay").click(tb_remove); jQuery( 'body').addClass('modal-open'); }} if(tb_detectMacXFF()){ jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack"); }else{ jQuery("#TB_overlay").addClass("TB_overlayBG"); } if(caption===null){caption="";} jQuery("body").append("
"); jQuery('#TB_load').show(); var baseURL; if(url.indexOf("?")!==-1){ baseURL=url.substr(0, url.indexOf("?")); }else{ baseURL=url; } var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType=baseURL.toLowerCase().match(urlString); if(urlType=='.jpg' || urlType=='.jpeg' || urlType=='.png' || urlType=='.gif' || urlType=='.bmp'){ TB_PrevCaption=""; TB_PrevURL=""; TB_PrevHTML=""; TB_NextCaption=""; TB_NextURL=""; TB_NextHTML=""; TB_imageCount=""; TB_FoundURL=false; if(imageGroup){ TB_TempArray=jQuery("a[rel="+imageGroup+"]").get(); for (TB_Counter=0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML==="")); TB_Counter++){ var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if(!(TB_TempArray[TB_Counter].href==url)){ if(TB_FoundURL){ TB_NextCaption=TB_TempArray[TB_Counter].title; TB_NextURL=TB_TempArray[TB_Counter].href; TB_NextHTML="  "+thickboxL10n.next+""; }else{ TB_PrevCaption=TB_TempArray[TB_Counter].title; TB_PrevURL=TB_TempArray[TB_Counter].href; TB_PrevHTML="  "+thickboxL10n.prev+""; }}else{ TB_FoundURL=true; TB_imageCount=thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length); }} } imgPreloader=new Image(); imgPreloader.onload=function(){ imgPreloader.onload=null; var pagesize=tb_getPageSize(); var x=pagesize[0] - 150; var y=pagesize[1] - 150; var imageWidth=imgPreloader.width; var imageHeight=imgPreloader.height; if(imageWidth > x){ imageHeight=imageHeight * (x / imageWidth); imageWidth=x; if(imageHeight > y){ imageWidth=imageWidth * (y / imageHeight); imageHeight=y; }} else if(imageHeight > y){ imageWidth=imageWidth * (y / imageHeight); imageHeight=y; if(imageWidth > x){ imageHeight=imageHeight * (x / imageWidth); imageWidth=x; }} TB_WIDTH=imageWidth + 30; TB_HEIGHT=imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"+thickboxL10n.close+"
"); jQuery("#TB_closeWindowButton").click(tb_remove); if(!(TB_PrevHTML==="")){ function goPrev(){ if(jQuery(document).unbind("click",goPrev)){jQuery(document).unbind("click",goPrev);} jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } jQuery("#TB_prev").click(goPrev); } if(!(TB_NextHTML==="")){ function goNext(){ jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } jQuery("#TB_next").click(goNext); } jQuery(document).bind('keydown.thickbox', function(e){ if(e.which==27){ tb_remove(); } else if(e.which==190){ if(!(TB_NextHTML=="")){ jQuery(document).unbind('thickbox'); goNext(); }} else if(e.which==188){ if(!(TB_PrevHTML=="")){ jQuery(document).unbind('thickbox'); goPrev(); }} return false; });tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_ImageOff").click(tb_remove); jQuery("#TB_window").css({'visibility':'visible'});}; imgPreloader.src=url; }else{ var queryString=url.replace(/^[^\?]+\??/,''); var params=tb_parseQuery( queryString); TB_WIDTH=(params['width']*1) + 30 || 630; TB_HEIGHT=(params['height']*1) + 40 || 440; ajaxContentW=TB_WIDTH - 30; ajaxContentH=TB_HEIGHT - 45; if(url.indexOf('TB_iframe')!=-1){ urlNoQuery=url.split('TB_'); jQuery("#TB_iframeContent").remove(); if(params['modal']!="true"){ jQuery("#TB_window").append("
"+caption+"
"+thickboxL10n.close+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append(""); }}else{ if(jQuery("#TB_window").css("visibility")!="visible"){ if(params['modal']!="true"){ jQuery("#TB_window").append("
"+caption+"
"); }else{ jQuery("#TB_overlay").unbind(); jQuery("#TB_window").append("
"); }}else{ jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW +"px"; jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH +"px"; jQuery("#TB_ajaxContent")[0].scrollTop=0; jQuery("#TB_ajaxWindowTitle").html(caption); }} jQuery("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline')!=-1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); jQuery("#TB_window").bind('tb_unload', function (){ jQuery('#' + params['inlineId']).append(jQuery("#TB_ajaxContent").children()); });tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'});}else if(url.indexOf('TB_iframe')!=-1){ tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'});}else{ jQuery("#TB_ajaxContent").load(url +="&random=" + (new Date().getTime()),function(){ tb_position(); jQuery("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); jQuery("#TB_window").css({'visibility':'visible'});});}} if(!params['modal']){ jQuery(document).bind('keydown.thickbox', function(e){ if(e.which==27){ tb_remove(); return false; }});}} catch(e){ }} function tb_showIframe(){ jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'});} function tb_remove(){ jQuery("#TB_imageOff").unbind("click"); jQuery("#TB_closeWindowButton").unbind("click"); jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});jQuery( 'body').removeClass('modal-open'); jQuery("#TB_load").remove(); if(typeof document.body.style.maxHeight=="undefined"){ jQuery("body","html").css({height:"auto", width:"auto"});jQuery("html").css("overflow",""); } jQuery(document).unbind('.thickbox'); return false; } function tb_position(){ var isIE6=typeof document.body.style.maxHeight==="undefined"; jQuery("#TB_window").css({marginLeft:'-' + parseInt((TB_WIDTH / 2),10) + 'px', width:TB_WIDTH + 'px'});if(! isIE6){ jQuery("#TB_window").css({marginTop:'-' + parseInt((TB_HEIGHT / 2),10) + 'px'});}} function tb_parseQuery ( query){ var Params={}; if(! query){return Params;} var Pairs=query.split(/[;&]/); for ( var i=0; i < Pairs.length; i++){ var KeyVal=Pairs[i].split('='); if(! KeyVal || KeyVal.length!=2){continue;} var key=unescape( KeyVal[0]); var val=unescape( KeyVal[1]); val=val.replace(/\+/g, ' '); Params[key]=val; } return Params; } function tb_getPageSize(){ var de=document.documentElement; var w=window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h=window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize=[w,h]; return arrayPageSize; } function tb_detectMacXFF(){ var userAgent=navigator.userAgent.toLowerCase(); if(userAgent.indexOf('mac')!=-1 && userAgent.indexOf('firefox')!=-1){ return true; }}; if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled,:disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); jQuery.easing['jswing']=jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def:'easeOutQuad', swing:function (x, t, b, c, d){ return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad:function (x, t, b, c, d){ return c*(t/=d)*t + b; }, easeOutQuad:function (x, t, b, c, d){ return -c *(t/=d)*(t-2) + b; }, easeInOutQuad:function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic:function (x, t, b, c, d){ return c*(t/=d)*t*t + b; }, easeOutCubic:function (x, t, b, c, d){ return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic:function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart:function (x, t, b, c, d){ return c*(t/=d)*t*t*t + b; }, easeOutQuart:function (x, t, b, c, d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart:function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint:function (x, t, b, c, d){ return c*(t/=d)*t*t*t*t + b; }, easeOutQuint:function (x, t, b, c, d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint:function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine:function (x, t, b, c, d){ return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine:function (x, t, b, c, d){ return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine:function (x, t, b, c, d){ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo:function (x, t, b, c, d){ return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo:function (x, t, b, c, d){ return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo:function (x, t, b, c, d){ if(t==0) return b; if(t==d) return b+c; if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc:function (x, t, b, c, d){ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc:function (x, t, b, c, d){ return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc:function (x, t, b, c, d){ if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic:function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; }, easeOutElastic:function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b; }, easeInOutElastic:function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5); if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b; }, easeInBack:function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack:function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack:function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce:function (x, t, b, c, d){ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce:function (x, t, b, c, d){ if((t/=d) < (1/2.75)){ return c*(7.5625*t*t) + b; } else if(t < (2/2.75)){ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if(t < (2.5/2.75)){ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; }else{ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }}, easeInOutBounce:function (x, t, b, c, d){ if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; }}); (function( $){ var $window=$(window); var windowHeight=$window.height(); $window.resize(function (){ windowHeight=$window.height(); });$.fn.parallax=function(xpos, speedFactor, outerHeight){ var $this=$(this); var getHeight; var firstTop; var paddingTop=0; $this.each(function(){ firstTop=$this.offset().top; });if(outerHeight){ getHeight=function(jqo){ return jqo.outerHeight(true); };}else{ getHeight=function(jqo){ return jqo.height(); };} if(arguments.length < 1 || xpos===null) xpos="50%"; if(arguments.length < 2 || speedFactor===null) speedFactor=0.1; if(arguments.length < 3 || outerHeight===null) outerHeight=true; function update(){ var pos=$window.scrollTop(); $this.each(function(){ var $element=$(this); var top=$element.offset().top; var height=getHeight($element); if(top + height < pos || top > pos + windowHeight){ return; } $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); });} $window.bind('scroll', update).resize(update); update(); };})(jQuery); !function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++dc;c+=1)if(r(a,b[c]))return c;return-1}function q(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function r(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function s(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function t(a){return a.outerWidth(!1)-a.width()}function u(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function v(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function w(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function x(a,b){var c=w(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){p(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus();var e=b.offsetWidth>0||b.offsetHeight>0;e&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=o(a.toUpperCase()).indexOf(o(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push(""),c.push(d(a.substring(e,e+f))),c.push(""),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&"function"==typeof e.abort&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page,i);i.callback(b)},error:function(a,b,c){var d={hasError:!0,jqXHR:a,textStatus:b,errorThrown:c};i.callback(d)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]},h=d?c(e):c;a.isArray(h)&&(a(h).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g))}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;if("string"==typeof b)return!0;throw new Error(c+" must be a string, function, or falsy value")}function K(b,c){if(a.isFunction(b)){var d=Array.prototype.slice.call(arguments,2);return b.apply(c,d)}return b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(r(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(){var b=this;a.each(arguments,function(a,c){b[c].remove(),b[c]=null})}function O(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="
",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};j=a(document),g=function(){var a=1;return function(){return a++}}(),d=O(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=a("",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",c.element.attr("title")),this.body=a("body"),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss,this.opts.element)),this.container.addClass(K(c.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("mouseover.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),v(this.results),this.dropdown.on("mousemove-filtered",f,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",f,this.bind(function(a){this._touchEvent=!0,this.highlightUnderEvent(a)})),this.dropdown.on("touchmove",f,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",f,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),u(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(a){a.stopPropagation()}),this.nextSearchTerm=b,a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||q(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",c.searchInputPlaceholder)},destroy:function(){var a=this.opts.element,c=a.data("select2"),d=this;this.close(),a.length&&a[0].detachEvent&&a.each(function(){this.detachEvent("onpropertychange",d._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,c!==b&&(c.container.remove(),c.liveRegion.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show()),N.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:r(a.attr("locked"),"locked")||r(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,h,i=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ","
"," ","
    ","
","
"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"selection","focusser")},initContainer:function(){var b,h,d=this.container,e=this.dropdown,f=g();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.find(".select2-focusser"),b.find(".select2-chosen").attr("id","select2-chosen-"+f),this.focusser.attr("aria-labelledby","select2-chosen-"+f),this.results.attr("id","select2-results-"+f),this.search.attr("aria-owns","select2-results-"+f),this.focusser.attr("id","s2id_autogen"+f),h=a("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(h.text()).attr("for",this.focusser.attr("id"));var i=this.opts.element.attr("title");this.opts.element.attr("title",i||h.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(a("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&229!=a.keyCode){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),u(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown touchstart","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown touchstart",this.bind(function(c){n(b),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(c)})),e.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder(),c.nextSearchTerm=c.opts.nextSearchTerm(a,c.search.val()))})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()===b?!1:(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val()},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected&&!this.disabled});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=r(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return r(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=O(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["","
","
    ","
","
"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=s(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return r(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){p(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,c){this.triggerSelect(a)&&""!==a.text&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),c&&c.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("
  • "),f=a("
  • "),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("
    "+j+"
    "),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),A(b),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument:"+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){var f=a.Event("select2-removing");if(f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented())return!1;for(;(e=p(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();return b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}),!0}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));p(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("
  • "+K(g.opts.formatNoMatches,g.opts.element,g.search.val())+"
  • ")},getMaxSearchWidth:function(){return this.selection.width()-t(this.search)},resizeSearch:function(){var a,b,c,d,e,f=t(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),s(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){p(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,e,f,g,h,c=Array.prototype.slice.call(arguments,0),i=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],j=["opened","isFocused","container","dropdown"],k=["val","data"],l={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?h=d.element.prop("multiple"):(h=d.multiple||!1,"tags"in d&&(d.multiple=h=!0)),e=h?new window.Select2["class"].multi:new window.Select2["class"].single,e.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin:"+c;if(p(c[0],i)<0)throw"Unknown method:"+c[0];if(g=b,e=a(this).data("select2"),e===b)return;if(f=c[0],"container"===f?g=e.container:"dropdown"===f?g=e.dropdown:(l[f]&&(f=l[f]),g=e[f].apply(e,c.slice(1))),p(c[0],j)>=0||p(c[0],k)>=0&&1==c.length)return!1}}),g===b?this:g},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(a){return a.css},formatSelectionCssClass:function(){return b},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a==b?null:a.id},matcher:function(a,b){return o(""+b).toUpperCase().indexOf(o(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(a){var b="ontouchstart"in window||navigator.msMaxTouchPoints>0;return b?a.opts.minimumResultsForSearch<0?!1:!0:!0}},a.fn.select2.locales=[],a.fn.select2.locales.en={formatMatches:function(a){return 1===a?"One result is available, press enter to select it.":a+" results are available, use up and down arrow keys to navigate." },formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" or more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results\u2026"},formatSearching:function(){return"Searching\u2026"}},a.extend(a.fn.select2.defaults,a.fn.select2.locales.en),a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:w,markMatch:E,escapeMarkup:F,stripDiacritics:o},"class":{"abstract":d,single:e,multi:f}}}}(jQuery); "function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath? (e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length; this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&& (this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this, [this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}), g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('
    ').wrap('
    ');this.$elem.find(".owl-wrapper").wrap('
    ');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")}, baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;bthis.itemsAmount&& !0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/ this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('
    ');a.owlControls.append(b);a.buttonPrev=f("
    ",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("
    ",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=f('
    ');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c",{"class":"owl-page"}),g=f("",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")===f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1; this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0), !0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0}, c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)}, checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))}, addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+ a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)"; a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]: !1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})}, gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos; "function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)} function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}), a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1; !1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)): (c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)});a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a=this.currentItem:!0)&&e=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b, 100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1, responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document); !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+f.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(){return a.isBeingDragged=!1,a.pane.removeClass("active"),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('
    '),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass("has-scrollbar")),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*j),nthis.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass("has-scrollbar")&&(this.$el.removeClass("has-scrollbar"),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass("flashed"),setTimeout(function(a){return function(){a.pane.removeClass("flashed")}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q}); var Swiper=function (selector, params){ 'use strict'; if(!document.body.outerHTML && document.body.__defineGetter__){ if(HTMLElement){ var element=HTMLElement.prototype; if(element.__defineGetter__){ element.__defineGetter__('outerHTML', function (){ return new XMLSerializer().serializeToString(this); });}} } if(!window.getComputedStyle){ window.getComputedStyle=function (el, pseudo){ this.el=el; this.getPropertyValue=function (prop){ var re=/(\-([a-z]){1})/g; if(prop==='float') prop='styleFloat'; if(re.test(prop)){ prop=prop.replace(re, function (){ return arguments[2].toUpperCase(); });} return el.currentStyle[prop] ? el.currentStyle[prop]:null; }; return this; };} if(!Array.prototype.indexOf){ Array.prototype.indexOf=function (obj, start){ for (var i=(start || 0), j=this.length; i < j; i++){ if(this[i]===obj){ return i; }} return -1; };} if(!document.querySelectorAll){ if(!window.jQuery) return; } function $$(selector, context){ if(document.querySelectorAll) return (context || document).querySelectorAll(selector); else return jQuery(selector, context); } if(typeof selector==='undefined') return; if(!(selector.nodeType)){ if($$(selector).length===0) return; } var _this=this; _this.touches={ start:0, startX:0, startY:0, current:0, currentX:0, currentY:0, diff:0, abs:0 }; _this.positions={ start:0, abs:0, diff:0, current:0 }; _this.times={ start:0, end:0 }; _this.id=(new Date()).getTime(); _this.container=(selector.nodeType) ? selector:$$(selector)[0]; _this.isTouched=false; _this.isMoved=false; _this.activeIndex=0; _this.centerIndex=0; _this.activeLoaderIndex=0; _this.activeLoopIndex=0; _this.previousIndex=null; _this.velocity=0; _this.snapGrid=[]; _this.slidesGrid=[]; _this.imagesToLoad=[]; _this.imagesLoaded=0; _this.wrapperLeft=0; _this.wrapperRight=0; _this.wrapperTop=0; _this.wrapperBottom=0; _this.isAndroid=navigator.userAgent.toLowerCase().indexOf('android') >=0; var wrapper, slideSize, wrapperSize, direction, isScrolling, containerSize; var defaults={ eventTarget:'wrapper', mode:'horizontal', touchRatio:1, speed:300, freeMode:false, freeModeFluid:false, momentumRatio:1, momentumBounce:true, momentumBounceRatio:1, slidesPerView:1, slidesPerGroup:1, slidesPerViewFit:true, simulateTouch:true, followFinger:true, shortSwipes:true, longSwipesRatio:0.5, moveStartThreshold:false, onlyExternal:false, createPagination:true, pagination:false, paginationElement:'span', paginationClickable:false, paginationAsRange:true, resistance:true, scrollContainer:false, preventLinks:true, preventLinksPropagation:false, noSwiping:false, noSwipingClass:'swiper-no-swiping', initialSlide:0, keyboardControl:false, mousewheelControl:false, mousewheelControlForceToAxis:false, useCSS3Transforms:true, autoplay:false, autoplayDisableOnInteraction:true, autoplayStopOnLast:false, loop:false, loopAdditionalSlides:0, roundLengths:false, calculateHeight:false, cssWidthAndHeight:false, updateOnImagesReady:true, releaseFormElements:true, watchActiveIndex:false, visibilityFullFit:false, offsetPxBefore:0, offsetPxAfter:0, offsetSlidesBefore:0, offsetSlidesAfter:0, centeredSlides:false, queueStartCallbacks:false, queueEndCallbacks:false, autoResize:true, resizeReInit:false, DOMAnimation:true, loader:{ slides:[], slidesHTMLType:'inner', surroundGroups:1, logic:'reload', loadAllSlides:false }, swipeToPrev:true, swipeToNext:true, slideElement:'div', slideClass:'swiper-slide', slideActiveClass:'swiper-slide-active', slideVisibleClass:'swiper-slide-visible', slideDuplicateClass:'swiper-slide-duplicate', wrapperClass:'swiper-wrapper', paginationElementClass:'swiper-pagination-switch', paginationActiveClass:'swiper-active-switch', paginationVisibleClass:'swiper-visible-switch' }; params=params || {}; for (var prop in defaults){ if(prop in params && typeof params[prop]==='object'){ for (var subProp in defaults[prop]){ if(! (subProp in params[prop])){ params[prop][subProp]=defaults[prop][subProp]; }} } else if(! (prop in params)){ params[prop]=defaults[prop]; }} _this.params=params; if(params.scrollContainer){ params.freeMode=true; params.freeModeFluid=true; } if(params.loop){ params.resistance='100%'; } var isH=params.mode==='horizontal'; var desktopEvents=['mousedown', 'mousemove', 'mouseup']; if(_this.browser.ie10) desktopEvents=['MSPointerDown', 'MSPointerMove', 'MSPointerUp']; if(_this.browser.ie11) desktopEvents=['pointerdown', 'pointermove', 'pointerup']; _this.touchEvents={ touchStart:_this.support.touch || !params.simulateTouch ? 'touchstart':desktopEvents[0], touchMove:_this.support.touch || !params.simulateTouch ? 'touchmove':desktopEvents[1], touchEnd:_this.support.touch || !params.simulateTouch ? 'touchend':desktopEvents[2] }; for (var i=_this.container.childNodes.length - 1; i >=0; i--){ if(_this.container.childNodes[i].className){ var _wrapperClasses=_this.container.childNodes[i].className.split(/\s+/); for (var j=0; j < _wrapperClasses.length; j++){ if(_wrapperClasses[j]===params.wrapperClass){ wrapper=_this.container.childNodes[i]; }} }} _this.wrapper=wrapper; _this._extendSwiperSlide=function (el){ el.append=function (){ if(params.loop){ el.insertAfter(_this.slides.length - _this.loopedSlides); }else{ _this.wrapper.appendChild(el); _this.reInit(); } return el; }; el.prepend=function (){ if(params.loop){ _this.wrapper.insertBefore(el, _this.slides[_this.loopedSlides]); _this.removeLoopedSlides(); _this.calcSlides(); _this.createLoop(); }else{ _this.wrapper.insertBefore(el, _this.wrapper.firstChild); } _this.reInit(); return el; }; el.insertAfter=function (index){ if(typeof index==='undefined') return false; var beforeSlide; if(params.loop){ beforeSlide=_this.slides[index + 1 + _this.loopedSlides]; if(beforeSlide){ _this.wrapper.insertBefore(el, beforeSlide); }else{ _this.wrapper.appendChild(el); } _this.removeLoopedSlides(); _this.calcSlides(); _this.createLoop(); }else{ beforeSlide=_this.slides[index + 1]; _this.wrapper.insertBefore(el, beforeSlide); } _this.reInit(); return el; }; el.clone=function (){ return _this._extendSwiperSlide(el.cloneNode(true)); }; el.remove=function (){ _this.wrapper.removeChild(el); _this.reInit(); }; el.html=function (html){ if(typeof html==='undefined'){ return el.innerHTML; }else{ el.innerHTML=html; return el; }}; el.index=function (){ var index; for (var i=_this.slides.length - 1; i >=0; i--){ if(el===_this.slides[i]) index=i; } return index; }; el.isActive=function (){ if(el.index()===_this.activeIndex) return true; else return false; }; if(!el.swiperSlideDataStorage) el.swiperSlideDataStorage={}; el.getData=function (name){ return el.swiperSlideDataStorage[name]; }; el.setData=function (name, value){ el.swiperSlideDataStorage[name]=value; return el; }; el.data=function (name, value){ if(typeof value==='undefined'){ return el.getAttribute('data-' + name); }else{ el.setAttribute('data-' + name, value); return el; }}; el.getWidth=function (outer, round){ return _this.h.getWidth(el, outer, round); }; el.getHeight=function (outer, round){ return _this.h.getHeight(el, outer, round); }; el.getOffset=function (){ return _this.h.getOffset(el); }; return el; }; _this.calcSlides=function (forceCalcSlides){ var oldNumber=_this.slides ? _this.slides.length:false; _this.slides=[]; _this.displaySlides=[]; for (var i=0; i < _this.wrapper.childNodes.length; i++){ if(_this.wrapper.childNodes[i].className){ var _className=_this.wrapper.childNodes[i].className; var _slideClasses=_className.split(/\s+/); for (var j=0; j < _slideClasses.length; j++){ if(_slideClasses[j]===params.slideClass){ _this.slides.push(_this.wrapper.childNodes[i]); }} }} for (i=_this.slides.length - 1; i >=0; i--){ _this._extendSwiperSlide(_this.slides[i]); } if(oldNumber===false) return; if(oldNumber!==_this.slides.length || forceCalcSlides){ removeSlideEvents(); addSlideEvents(); _this.updateActiveSlide(); if(_this.params.pagination) _this.createPagination(); _this.callPlugins('numberOfSlidesChanged'); }}; _this.createSlide=function (html, slideClassList, el){ slideClassList=slideClassList || _this.params.slideClass; el=el || params.slideElement; var newSlide=document.createElement(el); newSlide.innerHTML=html || ''; newSlide.className=slideClassList; return _this._extendSwiperSlide(newSlide); }; _this.appendSlide=function (html, slideClassList, el){ if(!html) return; if(html.nodeType){ return _this._extendSwiperSlide(html).append(); }else{ return _this.createSlide(html, slideClassList, el).append(); }}; _this.prependSlide=function (html, slideClassList, el){ if(!html) return; if(html.nodeType){ return _this._extendSwiperSlide(html).prepend(); }else{ return _this.createSlide(html, slideClassList, el).prepend(); }}; _this.insertSlideAfter=function (index, html, slideClassList, el){ if(typeof index==='undefined') return false; if(html.nodeType){ return _this._extendSwiperSlide(html).insertAfter(index); }else{ return _this.createSlide(html, slideClassList, el).insertAfter(index); }}; _this.removeSlide=function (index){ if(_this.slides[index]){ if(params.loop){ if(!_this.slides[index + _this.loopedSlides]) return false; _this.slides[index + _this.loopedSlides].remove(); _this.removeLoopedSlides(); _this.calcSlides(); _this.createLoop(); } else _this.slides[index].remove(); return true; } else return false; }; _this.removeLastSlide=function (){ if(_this.slides.length > 0){ if(params.loop){ _this.slides[_this.slides.length - 1 - _this.loopedSlides].remove(); _this.removeLoopedSlides(); _this.calcSlides(); _this.createLoop(); } else _this.slides[_this.slides.length - 1].remove(); return true; }else{ return false; }}; _this.removeAllSlides=function (){ var num=_this.slides.length; for (var i=_this.slides.length - 1; i >=0; i--){ _this.slides[i].remove(); if(i===num - 1){ _this.setWrapperTranslate(0); }} }; _this.getSlide=function (index){ return _this.slides[index]; }; _this.getLastSlide=function (){ return _this.slides[_this.slides.length - 1]; }; _this.getFirstSlide=function (){ return _this.slides[0]; }; _this.activeSlide=function (){ return _this.slides[_this.activeIndex]; }; _this.fireCallback=function (){ var callback=arguments[0]; if(Object.prototype.toString.call(callback)==='[object Array]'){ for (var i=0; i < callback.length; i++){ if(typeof callback[i]==='function'){ callback[i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); }} } else if(Object.prototype.toString.call(callback)==='[object String]'){ if(params['on' + callback]) _this.fireCallback(params['on' + callback], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); }else{ callback(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); }}; function isArray(obj){ if(Object.prototype.toString.apply(obj)==='[object Array]') return true; return false; } _this.addCallback=function (callback, func){ var _this=this, tempFunc; if(_this.params['on' + callback]){ if(isArray(this.params['on' + callback])){ return this.params['on' + callback].push(func); } else if(typeof this.params['on' + callback]==='function'){ tempFunc=this.params['on' + callback]; this.params['on' + callback]=[]; this.params['on' + callback].push(tempFunc); return this.params['on' + callback].push(func); }}else{ this.params['on' + callback]=[]; return this.params['on' + callback].push(func); }}; _this.removeCallbacks=function (callback){ if(_this.params['on' + callback]){ _this.params['on' + callback]=null; }}; var _plugins=[]; for (var plugin in _this.plugins){ if(params[plugin]){ var p=_this.plugins[plugin](_this, params[plugin]); if(p) _plugins.push(p); }} _this.callPlugins=function (method, args){ if(!args) args={}; for (var i=0; i < _plugins.length; i++){ if(method in _plugins[i]){ _plugins[i][method](args); }} }; if((_this.browser.ie10 || _this.browser.ie11) && !params.onlyExternal){ _this.wrapper.classList.add('swiper-wp8-' + (isH ? 'horizontal':'vertical')); } if(params.freeMode){ _this.container.className +=' swiper-free-mode'; } _this.initialized=false; _this.init=function (force, forceCalcSlides){ var _width=_this.h.getWidth(_this.container, false, params.roundLengths); var _height=_this.h.getHeight(_this.container, false, params.roundLengths); if(_width===_this.width && _height===_this.height && !force) return; _this.width=_width; _this.height=_height; var slideWidth, slideHeight, slideMaxHeight, wrapperWidth, wrapperHeight, slideLeft; var i; containerSize=isH ? _width:_height; var wrapper=_this.wrapper; if(force){ _this.calcSlides(forceCalcSlides); } if(params.slidesPerView==='auto'){ var slidesWidth=0; var slidesHeight=0; if(params.slidesOffset > 0){ wrapper.style.paddingLeft=''; wrapper.style.paddingRight=''; wrapper.style.paddingTop=''; wrapper.style.paddingBottom=''; } wrapper.style.width=''; wrapper.style.height=''; if(params.offsetPxBefore > 0){ if(isH) _this.wrapperLeft=params.offsetPxBefore; else _this.wrapperTop=params.offsetPxBefore; } if(params.offsetPxAfter > 0){ if(isH) _this.wrapperRight=params.offsetPxAfter; else _this.wrapperBottom=params.offsetPxAfter; } if(params.centeredSlides){ if(isH){ _this.wrapperLeft=(containerSize - this.slides[0].getWidth(true, params.roundLengths)) / 2; _this.wrapperRight=(containerSize - _this.slides[_this.slides.length - 1].getWidth(true, params.roundLengths)) / 2; }else{ _this.wrapperTop=(containerSize - _this.slides[0].getHeight(true, params.roundLengths)) / 2; _this.wrapperBottom=(containerSize - _this.slides[_this.slides.length - 1].getHeight(true, params.roundLengths)) / 2; }} if(isH){ if(_this.wrapperLeft >=0) wrapper.style.paddingLeft=_this.wrapperLeft + 'px'; if(_this.wrapperRight >=0) wrapper.style.paddingRight=_this.wrapperRight + 'px'; }else{ if(_this.wrapperTop >=0) wrapper.style.paddingTop=_this.wrapperTop + 'px'; if(_this.wrapperBottom >=0) wrapper.style.paddingBottom=_this.wrapperBottom + 'px'; } slideLeft=0; var centeredSlideLeft=0; _this.snapGrid=[]; _this.slidesGrid=[]; slideMaxHeight=0; for (i=0; i < _this.slides.length; i++){ slideWidth=_this.slides[i].getWidth(true, params.roundLengths); slideHeight=_this.slides[i].getHeight(true, params.roundLengths); if(params.calculateHeight){ slideMaxHeight=Math.max(slideMaxHeight, slideHeight); } var _slideSize=isH ? slideWidth:slideHeight; if(params.centeredSlides){ var nextSlideWidth=i===_this.slides.length - 1 ? 0:_this.slides[i + 1].getWidth(true, params.roundLengths); var nextSlideHeight=i===_this.slides.length - 1 ? 0:_this.slides[i + 1].getHeight(true, params.roundLengths); var nextSlideSize=isH ? nextSlideWidth:nextSlideHeight; if(_slideSize > containerSize){ if(params.slidesPerViewFit){ _this.snapGrid.push(slideLeft + _this.wrapperLeft); _this.snapGrid.push(slideLeft + _slideSize - containerSize + _this.wrapperLeft); }else{ for (var j=0; j <=Math.floor(_slideSize / (containerSize + _this.wrapperLeft)); j++){ if(j===0) _this.snapGrid.push(slideLeft + _this.wrapperLeft); else _this.snapGrid.push(slideLeft + _this.wrapperLeft + containerSize * j); }} _this.slidesGrid.push(slideLeft + _this.wrapperLeft); }else{ _this.snapGrid.push(centeredSlideLeft); _this.slidesGrid.push(centeredSlideLeft); } centeredSlideLeft +=_slideSize / 2 + nextSlideSize / 2; }else{ if(_slideSize > containerSize){ if(params.slidesPerViewFit){ _this.snapGrid.push(slideLeft); _this.snapGrid.push(slideLeft + _slideSize - containerSize); }else{ if(containerSize!==0){ for (var k=0; k <=Math.floor(_slideSize / containerSize); k++){ _this.snapGrid.push(slideLeft + containerSize * k); }}else{ _this.snapGrid.push(slideLeft); }} }else{ _this.snapGrid.push(slideLeft); } _this.slidesGrid.push(slideLeft); } slideLeft +=_slideSize; slidesWidth +=slideWidth; slidesHeight +=slideHeight; } if(params.calculateHeight) _this.height=slideMaxHeight; if(isH){ wrapperSize=slidesWidth + _this.wrapperRight + _this.wrapperLeft; if(!params.cssWidthAndHeight || params.cssWidthAndHeight==='height'){ wrapper.style.width=(slidesWidth) + 'px'; } if(!params.cssWidthAndHeight || params.cssWidthAndHeight==='width'){ wrapper.style.height=(_this.height) + 'px'; }}else{ if(!params.cssWidthAndHeight || params.cssWidthAndHeight==='height'){ wrapper.style.width=(_this.width) + 'px'; } if(!params.cssWidthAndHeight || params.cssWidthAndHeight==='width'){ wrapper.style.height=(slidesHeight) + 'px'; } wrapperSize=slidesHeight + _this.wrapperTop + _this.wrapperBottom; }} else if(params.scrollContainer){ wrapper.style.width=''; wrapper.style.height=''; wrapperWidth=_this.slides[0].getWidth(true, params.roundLengths); wrapperHeight=_this.slides[0].getHeight(true, params.roundLengths); wrapperSize=isH ? wrapperWidth:wrapperHeight; wrapper.style.width=wrapperWidth + 'px'; wrapper.style.height=wrapperHeight + 'px'; slideSize=isH ? wrapperWidth:wrapperHeight; }else{ if(params.calculateHeight){ slideMaxHeight=0; wrapperHeight=0; if(!isH) _this.container.style.height=''; wrapper.style.height=''; for (i=0; i < _this.slides.length; i++){ _this.slides[i].style.height=''; slideMaxHeight=Math.max(_this.slides[i].getHeight(true), slideMaxHeight); if(!isH) wrapperHeight +=_this.slides[i].getHeight(true); } slideHeight=slideMaxHeight; _this.height=slideHeight; if(isH) wrapperHeight=slideHeight; else { containerSize=slideHeight; _this.container.style.height=containerSize + 'px'; }}else{ slideHeight=isH ? _this.height:_this.height / params.slidesPerView; if(params.roundLengths) slideHeight=Math.ceil(slideHeight); wrapperHeight=isH ? _this.height:_this.slides.length * slideHeight; } slideWidth=isH ? _this.width / params.slidesPerView:_this.width; if(params.roundLengths) slideWidth=Math.ceil(slideWidth); wrapperWidth=isH ? _this.slides.length * slideWidth:_this.width; slideSize=isH ? slideWidth:slideHeight; if(params.offsetSlidesBefore > 0){ if(isH) _this.wrapperLeft=slideSize * params.offsetSlidesBefore; else _this.wrapperTop=slideSize * params.offsetSlidesBefore; } if(params.offsetSlidesAfter > 0){ if(isH) _this.wrapperRight=slideSize * params.offsetSlidesAfter; else _this.wrapperBottom=slideSize * params.offsetSlidesAfter; } if(params.offsetPxBefore > 0){ if(isH) _this.wrapperLeft=params.offsetPxBefore; else _this.wrapperTop=params.offsetPxBefore; } if(params.offsetPxAfter > 0){ if(isH) _this.wrapperRight=params.offsetPxAfter; else _this.wrapperBottom=params.offsetPxAfter; } if(params.centeredSlides){ if(isH){ _this.wrapperLeft=(containerSize - slideSize) / 2; _this.wrapperRight=(containerSize - slideSize) / 2; }else{ _this.wrapperTop=(containerSize - slideSize) / 2; _this.wrapperBottom=(containerSize - slideSize) / 2; }} if(isH){ if(_this.wrapperLeft > 0) wrapper.style.paddingLeft=_this.wrapperLeft + 'px'; if(_this.wrapperRight > 0) wrapper.style.paddingRight=_this.wrapperRight + 'px'; }else{ if(_this.wrapperTop > 0) wrapper.style.paddingTop=_this.wrapperTop + 'px'; if(_this.wrapperBottom > 0) wrapper.style.paddingBottom=_this.wrapperBottom + 'px'; } wrapperSize=isH ? wrapperWidth + _this.wrapperRight + _this.wrapperLeft:wrapperHeight + _this.wrapperTop + _this.wrapperBottom; if(parseFloat(wrapperWidth) > 0 && (!params.cssWidthAndHeight || params.cssWidthAndHeight==='height')){ wrapper.style.width=wrapperWidth + 'px'; } if(parseFloat(wrapperHeight) > 0 && (!params.cssWidthAndHeight || params.cssWidthAndHeight==='width')){ wrapper.style.height=wrapperHeight + 'px'; } slideLeft=0; _this.snapGrid=[]; _this.slidesGrid=[]; for (i=0; i < _this.slides.length; i++){ _this.snapGrid.push(slideLeft); _this.slidesGrid.push(slideLeft); slideLeft +=slideSize; if(parseFloat(slideWidth) > 0 && (!params.cssWidthAndHeight || params.cssWidthAndHeight==='height')){ _this.slides[i].style.width=slideWidth + 'px'; } if(parseFloat(slideHeight) > 0 && (!params.cssWidthAndHeight || params.cssWidthAndHeight==='width')){ _this.slides[i].style.height=slideHeight + 'px'; }} } if(!_this.initialized){ _this.callPlugins('onFirstInit'); if(params.onFirstInit) _this.fireCallback(params.onFirstInit, _this); }else{ _this.callPlugins('onInit'); if(params.onInit) _this.fireCallback(params.onInit, _this); } _this.initialized=true; }; _this.reInit=function (forceCalcSlides){ _this.init(true, forceCalcSlides); }; _this.resizeFix=function (reInit){ _this.callPlugins('beforeResizeFix'); _this.init(params.resizeReInit || reInit); if(!params.freeMode){ _this.swipeTo((params.loop ? _this.activeLoopIndex:_this.activeIndex), 0, false); if(params.autoplay){ if(_this.support.transitions && typeof autoplayTimeoutId!=='undefined'){ if(typeof autoplayTimeoutId!=='undefined'){ clearTimeout(autoplayTimeoutId); autoplayTimeoutId=undefined; _this.startAutoplay(); }}else{ if(typeof autoplayIntervalId!=='undefined'){ clearInterval(autoplayIntervalId); autoplayIntervalId=undefined; _this.startAutoplay(); }} }} else if(_this.getWrapperTranslate() < -maxWrapperPosition()){ _this.setWrapperTransition(0); _this.setWrapperTranslate(-maxWrapperPosition()); } _this.callPlugins('afterResizeFix'); }; function maxWrapperPosition(){ var a=(wrapperSize - containerSize); if(params.freeMode){ a=wrapperSize - containerSize; } if(params.slidesPerView > _this.slides.length && !params.centeredSlides){ a=0; } if(a < 0) a=0; return a; } function initEvents(){ var bind=_this.h.addEventListener; var eventTarget=params.eventTarget==='wrapper' ? _this.wrapper:_this.container; if(! (_this.browser.ie10 || _this.browser.ie11)){ if(_this.support.touch){ bind(eventTarget, 'touchstart', onTouchStart); bind(eventTarget, 'touchmove', onTouchMove); bind(eventTarget, 'touchend', onTouchEnd); } if(params.simulateTouch){ bind(eventTarget, 'mousedown', onTouchStart); bind(document, 'mousemove', onTouchMove); bind(document, 'mouseup', onTouchEnd); }}else{ bind(eventTarget, _this.touchEvents.touchStart, onTouchStart); bind(document, _this.touchEvents.touchMove, onTouchMove); bind(document, _this.touchEvents.touchEnd, onTouchEnd); } if(params.autoResize){ bind(window, 'resize', _this.resizeFix); } addSlideEvents(); _this._wheelEvent=false; if(params.mousewheelControl){ if(document.onmousewheel!==undefined){ _this._wheelEvent='mousewheel'; } if(!_this._wheelEvent){ try { new WheelEvent('wheel'); _this._wheelEvent='wheel'; } catch (e){}} if(!_this._wheelEvent){ _this._wheelEvent='DOMMouseScroll'; } if(_this._wheelEvent){ bind(_this.container, _this._wheelEvent, handleMousewheel); }} function _loadImage(img){ var image, src; var onReady=function (){ if(typeof _this==='undefined' || _this===null) return; if(_this.imagesLoaded!==undefined) _this.imagesLoaded++; if(_this.imagesLoaded===_this.imagesToLoad.length){ _this.reInit(); if(params.onImagesReady) _this.fireCallback(params.onImagesReady, _this); }}; if(!img.complete){ src=(img.currentSrc || img.getAttribute('src')); if(src){ image=new Image(); image.onload=onReady; image.onerror=onReady; image.src=src; }else{ onReady(); }}else{ onReady(); }} if(params.keyboardControl){ bind(document, 'keydown', handleKeyboardKeys); } if(params.updateOnImagesReady){ _this.imagesToLoad=$$('img', _this.container); for (var i=0; i < _this.imagesToLoad.length; i++){ _loadImage(_this.imagesToLoad[i]); }} } _this.destroy=function (removeStyles){ var unbind=_this.h.removeEventListener; var eventTarget=params.eventTarget==='wrapper' ? _this.wrapper:_this.container; if(! (_this.browser.ie10 || _this.browser.ie11)){ if(_this.support.touch){ unbind(eventTarget, 'touchstart', onTouchStart); unbind(eventTarget, 'touchmove', onTouchMove); unbind(eventTarget, 'touchend', onTouchEnd); } if(params.simulateTouch){ unbind(eventTarget, 'mousedown', onTouchStart); unbind(document, 'mousemove', onTouchMove); unbind(document, 'mouseup', onTouchEnd); }}else{ unbind(eventTarget, _this.touchEvents.touchStart, onTouchStart); unbind(document, _this.touchEvents.touchMove, onTouchMove); unbind(document, _this.touchEvents.touchEnd, onTouchEnd); } if(params.autoResize){ unbind(window, 'resize', _this.resizeFix); } removeSlideEvents(); if(params.paginationClickable){ removePaginationEvents(); } if(params.mousewheelControl && _this._wheelEvent){ unbind(_this.container, _this._wheelEvent, handleMousewheel); } if(params.keyboardControl){ unbind(document, 'keydown', handleKeyboardKeys); } if(params.autoplay){ _this.stopAutoplay(); } if(removeStyles){ _this.wrapper.removeAttribute('style'); for (var i=0; i < _this.slides.length; i++){ _this.slides[i].removeAttribute('style'); }} _this.callPlugins('onDestroy'); if(window.jQuery && window.jQuery(_this.container).data('swiper')){ window.jQuery(_this.container).removeData('swiper'); } if(window.Zepto && window.Zepto(_this.container).data('swiper')){ window.Zepto(_this.container).removeData('swiper'); } _this=null; }; function addSlideEvents(){ var bind=_this.h.addEventListener, i; if(params.preventLinks){ var links=$$('a', _this.container); for (i=0; i < links.length; i++){ bind(links[i], 'click', preventClick); }} if(params.releaseFormElements){ var formElements=$$('input, textarea, select', _this.container); for (i=0; i < formElements.length; i++){ bind(formElements[i], _this.touchEvents.touchStart, releaseForms, true); if(_this.support.touch && params.simulateTouch){ bind(formElements[i], 'mousedown', releaseForms, true); }} } if(params.onSlideClick){ for (i=0; i < _this.slides.length; i++){ bind(_this.slides[i], 'click', slideClick); }} if(params.onSlideTouch){ for (i=0; i < _this.slides.length; i++){ bind(_this.slides[i], _this.touchEvents.touchStart, slideTouch); }} } function removeSlideEvents(){ var unbind=_this.h.removeEventListener, i; if(params.onSlideClick){ for (i=0; i < _this.slides.length; i++){ unbind(_this.slides[i], 'click', slideClick); }} if(params.onSlideTouch){ for (i=0; i < _this.slides.length; i++){ unbind(_this.slides[i], _this.touchEvents.touchStart, slideTouch); }} if(params.releaseFormElements){ var formElements=$$('input, textarea, select', _this.container); for (i=0; i < formElements.length; i++){ unbind(formElements[i], _this.touchEvents.touchStart, releaseForms, true); if(_this.support.touch && params.simulateTouch){ unbind(formElements[i], 'mousedown', releaseForms, true); }} } if(params.preventLinks){ var links=$$('a', _this.container); for (i=0; i < links.length; i++){ unbind(links[i], 'click', preventClick); }} } function handleKeyboardKeys(e){ var kc=e.keyCode || e.charCode; if(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) return; if(kc===37 || kc===39 || kc===38 || kc===40){ var inView=false; var swiperOffset=_this.h.getOffset(_this.container); var scrollLeft=_this.h.windowScroll().left; var scrollTop=_this.h.windowScroll().top; var windowWidth=_this.h.windowWidth(); var windowHeight=_this.h.windowHeight(); var swiperCoord=[ [swiperOffset.left, swiperOffset.top], [swiperOffset.left + _this.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + _this.height], [swiperOffset.left + _this.width, swiperOffset.top + _this.height] ]; for (var i=0; i < swiperCoord.length; i++){ var point=swiperCoord[i]; if(point[0] >=scrollLeft && point[0] <=scrollLeft + windowWidth && point[1] >=scrollTop && point[1] <=scrollTop + windowHeight ){ inView=true; }} if(!inView) return; } if(isH){ if(kc===37 || kc===39){ if(e.preventDefault) e.preventDefault(); else e.returnValue=false; } if(kc===39) _this.swipeNext(); if(kc===37) _this.swipePrev(); }else{ if(kc===38 || kc===40){ if(e.preventDefault) e.preventDefault(); else e.returnValue=false; } if(kc===40) _this.swipeNext(); if(kc===38) _this.swipePrev(); }} _this.disableKeyboardControl=function (){ params.keyboardControl=false; _this.h.removeEventListener(document, 'keydown', handleKeyboardKeys); }; _this.enableKeyboardControl=function (){ params.keyboardControl=true; _this.h.addEventListener(document, 'keydown', handleKeyboardKeys); }; var lastScrollTime=(new Date()).getTime(); function handleMousewheel(e){ var we=_this._wheelEvent; var delta=0; if(e.detail) delta=-e.detail; else if(we==='mousewheel'){ if(params.mousewheelControlForceToAxis){ if(isH){ if(Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta=e.wheelDeltaX; else return; }else{ if(Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX)) delta=e.wheelDeltaY; else return; }}else{ delta=e.wheelDelta; }} else if(we==='DOMMouseScroll') delta=-e.detail; else if(we==='wheel'){ if(params.mousewheelControlForceToAxis){ if(isH){ if(Math.abs(e.deltaX) > Math.abs(e.deltaY)) delta=-e.deltaX; else return; }else{ if(Math.abs(e.deltaY) > Math.abs(e.deltaX)) delta=-e.deltaY; else return; }}else{ delta=Math.abs(e.deltaX) > Math.abs(e.deltaY) ? - e.deltaX:- e.deltaY; }} if(!params.freeMode){ if((new Date()).getTime() - lastScrollTime > 60){ if(delta < 0) _this.swipeNext(); else _this.swipePrev(); } lastScrollTime=(new Date()).getTime(); }else{ var position=_this.getWrapperTranslate() + delta; if(position > 0) position=0; if(position < -maxWrapperPosition()) position=-maxWrapperPosition(); _this.setWrapperTransition(0); _this.setWrapperTranslate(position); _this.updateActiveSlide(position); if(position===0 || position===-maxWrapperPosition()) return; } if(params.autoplay) _this.stopAutoplay(true); if(e.preventDefault) e.preventDefault(); else e.returnValue=false; return false; } _this.disableMousewheelControl=function (){ if(!_this._wheelEvent) return false; params.mousewheelControl=false; _this.h.removeEventListener(_this.container, _this._wheelEvent, handleMousewheel); return true; }; _this.enableMousewheelControl=function (){ if(!_this._wheelEvent) return false; params.mousewheelControl=true; _this.h.addEventListener(_this.container, _this._wheelEvent, handleMousewheel); return true; }; if(params.grabCursor){ var containerStyle=_this.container.style; containerStyle.cursor='move'; containerStyle.cursor='grab'; containerStyle.cursor='-moz-grab'; containerStyle.cursor='-webkit-grab'; } _this.allowSlideClick=true; function slideClick(event){ if(_this.allowSlideClick){ setClickedSlide(event); _this.fireCallback(params.onSlideClick, _this, event); }} function slideTouch(event){ setClickedSlide(event); _this.fireCallback(params.onSlideTouch, _this, event); } function setClickedSlide(event){ if(!event.currentTarget){ var element=event.srcElement; do { if(element.className.indexOf(params.slideClass) > -1){ break; } element=element.parentNode; } while (element); _this.clickedSlide=element; }else{ _this.clickedSlide=event.currentTarget; } _this.clickedSlideIndex=_this.slides.indexOf(_this.clickedSlide); _this.clickedSlideLoopIndex=_this.clickedSlideIndex - (_this.loopedSlides || 0); } _this.allowLinks=true; function preventClick(e){ if(!_this.allowLinks){ if(e.preventDefault) e.preventDefault(); else e.returnValue=false; if(params.preventLinksPropagation && 'stopPropagation' in e){ e.stopPropagation(); } return false; }} function releaseForms(e){ if(e.stopPropagation) e.stopPropagation(); else e.returnValue=false; return false; } var isTouchEvent=false; var allowThresholdMove; var allowMomentumBounce=true; function onTouchStart(event){ if(params.preventLinks) _this.allowLinks=true; if(_this.isTouched || params.onlyExternal){ return false; } var eventTarget=event.target || event.srcElement; if(document.activeElement && document.activeElement!==document.body){ if(document.activeElement!==eventTarget) document.activeElement.blur(); } var formTagNames=('input select textarea').split(' '); if(params.noSwiping && (eventTarget) && noSwipingSlide(eventTarget)) return false; allowMomentumBounce=false; _this.isTouched=true; isTouchEvent=event.type==='touchstart'; if(!isTouchEvent && 'which' in event && event.which===3){ _this.isTouched=false; return false; } if(!isTouchEvent || event.targetTouches.length===1){ _this.callPlugins('onTouchStartBegin'); if(!isTouchEvent && !_this.isAndroid && formTagNames.indexOf(eventTarget.tagName.toLowerCase()) < 0){ if(event.preventDefault) event.preventDefault(); else event.returnValue=false; } var pageX=isTouchEvent ? event.targetTouches[0].pageX:(event.pageX || event.clientX); var pageY=isTouchEvent ? event.targetTouches[0].pageY:(event.pageY || event.clientY); _this.touches.startX=_this.touches.currentX=pageX; _this.touches.startY=_this.touches.currentY=pageY; _this.touches.start=_this.touches.current=isH ? pageX:pageY; _this.setWrapperTransition(0); _this.positions.start=_this.positions.current=_this.getWrapperTranslate(); _this.setWrapperTranslate(_this.positions.start); _this.times.start=(new Date()).getTime(); isScrolling=undefined; if(params.moveStartThreshold > 0){ allowThresholdMove=false; } if(params.onTouchStart) _this.fireCallback(params.onTouchStart, _this, event); _this.callPlugins('onTouchStartEnd'); }} var velocityPrevPosition, velocityPrevTime; function onTouchMove(event){ if(!_this.isTouched || params.onlyExternal) return; if(isTouchEvent && event.type==='mousemove') return; var pageX=isTouchEvent ? event.targetTouches[0].pageX:(event.pageX || event.clientX); var pageY=isTouchEvent ? event.targetTouches[0].pageY:(event.pageY || event.clientY); if(typeof isScrolling==='undefined' && isH){ isScrolling=!!(isScrolling || Math.abs(pageY - _this.touches.startY) > Math.abs(pageX - _this.touches.startX)); } if(typeof isScrolling==='undefined' && !isH){ isScrolling=!!(isScrolling || Math.abs(pageY - _this.touches.startY) < Math.abs(pageX - _this.touches.startX)); } if(isScrolling){ _this.isTouched=false; return; } if(isH){ if((!params.swipeToNext && pageX < _this.touches.startX) || ((!params.swipeToPrev && pageX > _this.touches.startX))){ return; }}else{ if((!params.swipeToNext && pageY < _this.touches.startY) || ((!params.swipeToPrev && pageY > _this.touches.startY))){ return; }} if(event.assignedToSwiper){ _this.isTouched=false; return; } event.assignedToSwiper=true; if(params.preventLinks){ _this.allowLinks=false; } if(params.onSlideClick){ _this.allowSlideClick=false; } if(params.autoplay){ _this.stopAutoplay(true); } if(!isTouchEvent || event.touches.length===1){ if(!_this.isMoved){ _this.callPlugins('onTouchMoveStart'); if(params.loop){ _this.fixLoop(); _this.positions.start=_this.getWrapperTranslate(); } if(params.onTouchMoveStart) _this.fireCallback(params.onTouchMoveStart, _this); } _this.isMoved=true; if(event.preventDefault) event.preventDefault(); else event.returnValue=false; _this.touches.current=isH ? pageX:pageY; _this.positions.current=(_this.touches.current - _this.touches.start) * params.touchRatio + _this.positions.start; if(_this.positions.current > 0 && params.onResistanceBefore){ _this.fireCallback(params.onResistanceBefore, _this, _this.positions.current); } if(_this.positions.current < -maxWrapperPosition() && params.onResistanceAfter){ _this.fireCallback(params.onResistanceAfter, _this, Math.abs(_this.positions.current + maxWrapperPosition())); } if(params.resistance && params.resistance!=='100%'){ var resistance; if(_this.positions.current > 0){ resistance=1 - _this.positions.current / containerSize / 2; if(resistance < 0.5) _this.positions.current=(containerSize / 2); else _this.positions.current=_this.positions.current * resistance; } if(_this.positions.current < -maxWrapperPosition()){ var diff=(_this.touches.current - _this.touches.start) * params.touchRatio + (maxWrapperPosition() + _this.positions.start); resistance=(containerSize + diff) / (containerSize); var newPos=_this.positions.current - diff * (1 - resistance) / 2; var stopPos=-maxWrapperPosition() - containerSize / 2; if(newPos < stopPos || resistance <=0) _this.positions.current=stopPos; else _this.positions.current=newPos; }} if(params.resistance && params.resistance==='100%'){ if(_this.positions.current > 0 && !(params.freeMode && !params.freeModeFluid)){ _this.positions.current=0; } if(_this.positions.current < -maxWrapperPosition() && !(params.freeMode && !params.freeModeFluid)){ _this.positions.current=-maxWrapperPosition(); }} if(!params.followFinger) return; if(!params.moveStartThreshold){ _this.setWrapperTranslate(_this.positions.current); }else{ if(Math.abs(_this.touches.current - _this.touches.start) > params.moveStartThreshold || allowThresholdMove){ if(!allowThresholdMove){ allowThresholdMove=true; _this.touches.start=_this.touches.current; return; } _this.setWrapperTranslate(_this.positions.current); }else{ _this.positions.current=_this.positions.start; }} if(params.freeMode || params.watchActiveIndex){ _this.updateActiveSlide(_this.positions.current); } if(params.grabCursor){ _this.container.style.cursor='move'; _this.container.style.cursor='grabbing'; _this.container.style.cursor='-moz-grabbin'; _this.container.style.cursor='-webkit-grabbing'; } if(!velocityPrevPosition) velocityPrevPosition=_this.touches.current; if(!velocityPrevTime) velocityPrevTime=(new Date()).getTime(); _this.velocity=(_this.touches.current - velocityPrevPosition) / ((new Date()).getTime() - velocityPrevTime) / 2; if(Math.abs(_this.touches.current - velocityPrevPosition) < 2) _this.velocity=0; velocityPrevPosition=_this.touches.current; velocityPrevTime=(new Date()).getTime(); _this.callPlugins('onTouchMoveEnd'); if(params.onTouchMove) _this.fireCallback(params.onTouchMove, _this, event); return false; }} function onTouchEnd(event){ if(isScrolling){ _this.swipeReset(); } if(params.onlyExternal || !_this.isTouched) return; _this.isTouched=false; if(params.grabCursor){ _this.container.style.cursor='move'; _this.container.style.cursor='grab'; _this.container.style.cursor='-moz-grab'; _this.container.style.cursor='-webkit-grab'; } if(!_this.positions.current && _this.positions.current!==0){ _this.positions.current=_this.positions.start; } if(params.followFinger){ _this.setWrapperTranslate(_this.positions.current); } _this.times.end=(new Date()).getTime(); _this.touches.diff=_this.touches.current - _this.touches.start; _this.touches.abs=Math.abs(_this.touches.diff); _this.positions.diff=_this.positions.current - _this.positions.start; _this.positions.abs=Math.abs(_this.positions.diff); var diff=_this.positions.diff; var diffAbs=_this.positions.abs; var timeDiff=_this.times.end - _this.times.start; if(diffAbs < 5 && (timeDiff) < 300 && _this.allowLinks===false){ if(!params.freeMode && diffAbs!==0) _this.swipeReset(); if(params.preventLinks){ _this.allowLinks=true; } if(params.onSlideClick){ _this.allowSlideClick=true; }} setTimeout(function (){ if(typeof _this==='undefined' || _this===null) return; if(params.preventLinks){ _this.allowLinks=true; } if(params.onSlideClick){ _this.allowSlideClick=true; }}, 100); var maxPosition=maxWrapperPosition(); if(!_this.isMoved && params.freeMode){ _this.isMoved=false; if(params.onTouchEnd) _this.fireCallback(params.onTouchEnd, _this, event); _this.callPlugins('onTouchEnd'); return; } if(!_this.isMoved || _this.positions.current > 0 || _this.positions.current < -maxPosition){ _this.swipeReset(); if(params.onTouchEnd) _this.fireCallback(params.onTouchEnd, _this, event); _this.callPlugins('onTouchEnd'); return; } _this.isMoved=false; if(params.freeMode){ if(params.freeModeFluid){ var momentumDuration=1000 * params.momentumRatio; var momentumDistance=_this.velocity * momentumDuration; var newPosition=_this.positions.current + momentumDistance; var doBounce=false; var afterBouncePosition; var bounceAmount=Math.abs(_this.velocity) * 20 * params.momentumBounceRatio; if(newPosition < -maxPosition){ if(params.momentumBounce && _this.support.transitions){ if(newPosition + maxPosition < -bounceAmount) newPosition=-maxPosition - bounceAmount; afterBouncePosition=-maxPosition; doBounce=true; allowMomentumBounce=true; } else newPosition=-maxPosition; } if(newPosition > 0){ if(params.momentumBounce && _this.support.transitions){ if(newPosition > bounceAmount) newPosition=bounceAmount; afterBouncePosition=0; doBounce=true; allowMomentumBounce=true; } else newPosition=0; } if(_this.velocity!==0) momentumDuration=Math.abs((newPosition - _this.positions.current) / _this.velocity); _this.setWrapperTranslate(newPosition); _this.setWrapperTransition(momentumDuration); if(params.momentumBounce && doBounce){ _this.wrapperTransitionEnd(function (){ if(!allowMomentumBounce) return; if(params.onMomentumBounce) _this.fireCallback(params.onMomentumBounce, _this); _this.callPlugins('onMomentumBounce'); _this.setWrapperTranslate(afterBouncePosition); _this.setWrapperTransition(300); });} _this.updateActiveSlide(newPosition); } if(!params.freeModeFluid || timeDiff >=300) _this.updateActiveSlide(_this.positions.current); if(params.onTouchEnd) _this.fireCallback(params.onTouchEnd, _this, event); _this.callPlugins('onTouchEnd'); return; } direction=diff < 0 ? 'toNext':'toPrev'; if(direction==='toNext' && (timeDiff <=300)){ if(diffAbs < 30 || !params.shortSwipes) _this.swipeReset(); else _this.swipeNext(true, true); } if(direction==='toPrev' && (timeDiff <=300)){ if(diffAbs < 30 || !params.shortSwipes) _this.swipeReset(); else _this.swipePrev(true, true); } var targetSlideSize=0; if(params.slidesPerView==='auto'){ var currentPosition=Math.abs(_this.getWrapperTranslate()); var slidesOffset=0; var _slideSize; for (var i=0; i < _this.slides.length; i++){ _slideSize=isH ? _this.slides[i].getWidth(true, params.roundLengths):_this.slides[i].getHeight(true, params.roundLengths); slidesOffset +=_slideSize; if(slidesOffset > currentPosition){ targetSlideSize=_slideSize; break; }} if(targetSlideSize > containerSize) targetSlideSize=containerSize; }else{ targetSlideSize=slideSize * params.slidesPerView; } if(direction==='toNext' && (timeDiff > 300)){ if(diffAbs >=targetSlideSize * params.longSwipesRatio){ _this.swipeNext(true, true); }else{ _this.swipeReset(); }} if(direction==='toPrev' && (timeDiff > 300)){ if(diffAbs >=targetSlideSize * params.longSwipesRatio){ _this.swipePrev(true, true); }else{ _this.swipeReset(); }} if(params.onTouchEnd) _this.fireCallback(params.onTouchEnd, _this, event); _this.callPlugins('onTouchEnd'); } function hasClass(el, classname){ return el && el.getAttribute('class') && el.getAttribute('class').indexOf(classname) > -1; } function noSwipingSlide(el){ var noSwiping=false; do { if(hasClass(el, params.noSwipingClass)){ noSwiping=true; } el=el.parentElement; } while (!noSwiping && el.parentElement && !hasClass(el, params.wrapperClass)); if(!noSwiping && hasClass(el, params.wrapperClass) && hasClass(el, params.noSwipingClass)) noSwiping=true; return noSwiping; } function addClassToHtmlString(klass, outerHtml){ var par=document.createElement('div'); var child; par.innerHTML=outerHtml; child=par.firstChild; child.className +=' ' + klass; return child.outerHTML; } _this.swipeNext=function (runCallbacks, internal){ if(typeof runCallbacks==='undefined') runCallbacks=true; if(!internal && params.loop) _this.fixLoop(); if(!internal && params.autoplay) _this.stopAutoplay(true); _this.callPlugins('onSwipeNext'); var currentPosition=_this.getWrapperTranslate().toFixed(2); var newPosition=currentPosition; if(params.slidesPerView==='auto'){ for (var i=0; i < _this.snapGrid.length; i++){ if(-currentPosition >=_this.snapGrid[i].toFixed(2) && -currentPosition < _this.snapGrid[i + 1].toFixed(2)){ newPosition=-_this.snapGrid[i + 1]; break; }} }else{ var groupSize=slideSize * params.slidesPerGroup; newPosition=-(Math.floor(Math.abs(currentPosition) / Math.floor(groupSize)) * groupSize + groupSize); } if(newPosition < -maxWrapperPosition()){ newPosition=-maxWrapperPosition(); } if(newPosition===currentPosition) return false; swipeToPosition(newPosition, 'next', {runCallbacks:runCallbacks});return true; }; _this.swipePrev=function (runCallbacks, internal){ if(typeof runCallbacks==='undefined') runCallbacks=true; if(!internal && params.loop) _this.fixLoop(); if(!internal && params.autoplay) _this.stopAutoplay(true); _this.callPlugins('onSwipePrev'); var currentPosition=Math.ceil(_this.getWrapperTranslate()); var newPosition; if(params.slidesPerView==='auto'){ newPosition=0; for (var i=1; i < _this.snapGrid.length; i++){ if(-currentPosition===_this.snapGrid[i]){ newPosition=-_this.snapGrid[i - 1]; break; } if(-currentPosition > _this.snapGrid[i] && -currentPosition < _this.snapGrid[i + 1]){ newPosition=-_this.snapGrid[i]; break; }} }else{ var groupSize=slideSize * params.slidesPerGroup; newPosition=-(Math.ceil(-currentPosition / groupSize) - 1) * groupSize; } if(newPosition > 0) newPosition=0; if(newPosition===currentPosition) return false; swipeToPosition(newPosition, 'prev', {runCallbacks:runCallbacks});return true; }; _this.swipeReset=function (runCallbacks){ if(typeof runCallbacks==='undefined') runCallbacks=true; _this.callPlugins('onSwipeReset'); var currentPosition=_this.getWrapperTranslate(); var groupSize=slideSize * params.slidesPerGroup; var newPosition; var maxPosition=-maxWrapperPosition(); if(params.slidesPerView==='auto'){ newPosition=0; for (var i=0; i < _this.snapGrid.length; i++){ if(-currentPosition===_this.snapGrid[i]) return; if(-currentPosition >=_this.snapGrid[i] && -currentPosition < _this.snapGrid[i + 1]){ if(_this.positions.diff > 0) newPosition=-_this.snapGrid[i + 1]; else newPosition=-_this.snapGrid[i]; break; }} if(-currentPosition >=_this.snapGrid[_this.snapGrid.length - 1]) newPosition=-_this.snapGrid[_this.snapGrid.length - 1]; if(currentPosition <=-maxWrapperPosition()) newPosition=-maxWrapperPosition(); }else{ newPosition=currentPosition < 0 ? Math.round(currentPosition / groupSize) * groupSize:0; if(currentPosition <=-maxWrapperPosition()) newPosition=-maxWrapperPosition(); } if(params.scrollContainer){ newPosition=currentPosition < 0 ? currentPosition:0; } if(newPosition < -maxWrapperPosition()){ newPosition=-maxWrapperPosition(); } if(params.scrollContainer && (containerSize > slideSize)){ newPosition=0; } if(newPosition===currentPosition) return false; swipeToPosition(newPosition, 'reset', {runCallbacks:runCallbacks});return true; }; _this.swipeTo=function (index, speed, runCallbacks){ index=parseInt(index, 10); _this.callPlugins('onSwipeTo', {index:index, speed:speed});if(params.loop) index=index + _this.loopedSlides; var currentPosition=_this.getWrapperTranslate(); if(!isFinite(index) || index > (_this.slides.length - 1) || index < 0) return; var newPosition; if(params.slidesPerView==='auto'){ newPosition=-_this.slidesGrid[index]; }else{ newPosition=-index * slideSize; } if(newPosition < - maxWrapperPosition()){ newPosition=- maxWrapperPosition(); } if(newPosition===currentPosition) return false; if(typeof runCallbacks==='undefined') runCallbacks=true; swipeToPosition(newPosition, 'to', {index:index, speed:speed, runCallbacks:runCallbacks});return true; }; function swipeToPosition(newPosition, action, toOptions){ var speed=(action==='to' && toOptions.speed >=0) ? toOptions.speed:params.speed; var timeOld=+ new Date(); function anim(){ var timeNew=+ new Date(); var time=timeNew - timeOld; currentPosition +=animationStep * time / (1000 / 60); condition=direction==='toNext' ? currentPosition > newPosition:currentPosition < newPosition; if(condition){ _this.setWrapperTranslate(Math.ceil(currentPosition)); _this._DOMAnimating=true; window.setTimeout(function (){ anim(); }, 1000 / 60); }else{ if(params.onSlideChangeEnd){ if(action==='to'){ if(toOptions.runCallbacks===true) _this.fireCallback(params.onSlideChangeEnd, _this, direction); }else{ _this.fireCallback(params.onSlideChangeEnd, _this, direction); }} _this.setWrapperTranslate(newPosition); _this._DOMAnimating=false; }} if(_this.support.transitions || !params.DOMAnimation){ _this.setWrapperTranslate(newPosition); _this.setWrapperTransition(speed); }else{ var currentPosition=_this.getWrapperTranslate(); var animationStep=Math.ceil((newPosition - currentPosition) / speed * (1000 / 60)); var direction=currentPosition > newPosition ? 'toNext':'toPrev'; var condition=direction==='toNext' ? currentPosition > newPosition:currentPosition < newPosition; if(_this._DOMAnimating) return; anim(); } _this.updateActiveSlide(newPosition); if(params.onSlideNext && action==='next' && toOptions.runCallbacks===true){ _this.fireCallback(params.onSlideNext, _this, newPosition); } if(params.onSlidePrev && action==='prev' && toOptions.runCallbacks===true){ _this.fireCallback(params.onSlidePrev, _this, newPosition); } if(params.onSlideReset && action==='reset' && toOptions.runCallbacks===true){ _this.fireCallback(params.onSlideReset, _this, newPosition); } if((action==='next' || action==='prev' || action==='to') && toOptions.runCallbacks===true) slideChangeCallbacks(action); } _this._queueStartCallbacks=false; _this._queueEndCallbacks=false; function slideChangeCallbacks(direction){ _this.callPlugins('onSlideChangeStart'); if(params.onSlideChangeStart){ if(params.queueStartCallbacks && _this.support.transitions){ if(_this._queueStartCallbacks) return; _this._queueStartCallbacks=true; _this.fireCallback(params.onSlideChangeStart, _this, direction); _this.wrapperTransitionEnd(function (){ _this._queueStartCallbacks=false; });} else _this.fireCallback(params.onSlideChangeStart, _this, direction); } if(params.onSlideChangeEnd){ if(_this.support.transitions){ if(params.queueEndCallbacks){ if(_this._queueEndCallbacks) return; _this._queueEndCallbacks=true; _this.wrapperTransitionEnd(function (swiper){ _this.fireCallback(params.onSlideChangeEnd, swiper, direction); });}else{ _this.wrapperTransitionEnd(function (swiper){ _this.fireCallback(params.onSlideChangeEnd, swiper, direction); });}}else{ if(!params.DOMAnimation){ setTimeout(function (){ _this.fireCallback(params.onSlideChangeEnd, _this, direction); }, 10); }} }} _this.updateActiveSlide=function (position){ if(!_this.initialized) return; if(_this.slides.length===0) return; _this.previousIndex=_this.activeIndex; if(typeof position==='undefined') position=_this.getWrapperTranslate(); if(position > 0) position=0; var i; if(params.slidesPerView==='auto'){ var slidesOffset=0; _this.activeIndex=_this.slidesGrid.indexOf(-position); if(_this.activeIndex < 0){ for (i=0; i < _this.slidesGrid.length - 1; i++){ if(-position > _this.slidesGrid[i] && -position < _this.slidesGrid[i + 1]){ break; }} var leftDistance=Math.abs(_this.slidesGrid[i] + position); var rightDistance=Math.abs(_this.slidesGrid[i + 1] + position); if(leftDistance <=rightDistance) _this.activeIndex=i; else _this.activeIndex=i + 1; }}else{ _this.activeIndex=Math[params.visibilityFullFit ? 'ceil':'round'](-position / slideSize); } if(_this.activeIndex===_this.slides.length) _this.activeIndex=_this.slides.length - 1; if(_this.activeIndex < 0) _this.activeIndex=0; if(!_this.slides[_this.activeIndex]) return; _this.calcVisibleSlides(position); if(_this.support.classList){ var slide; for (i=0; i < _this.slides.length; i++){ slide=_this.slides[i]; slide.classList.remove(params.slideActiveClass); if(_this.visibleSlides.indexOf(slide) >=0){ slide.classList.add(params.slideVisibleClass); }else{ slide.classList.remove(params.slideVisibleClass); }} _this.slides[_this.activeIndex].classList.add(params.slideActiveClass); }else{ var activeClassRegexp=new RegExp('\\s*' + params.slideActiveClass); var inViewClassRegexp=new RegExp('\\s*' + params.slideVisibleClass); for (i=0; i < _this.slides.length; i++){ _this.slides[i].className=_this.slides[i].className.replace(activeClassRegexp, '').replace(inViewClassRegexp, ''); if(_this.visibleSlides.indexOf(_this.slides[i]) >=0){ _this.slides[i].className +=' ' + params.slideVisibleClass; }} _this.slides[_this.activeIndex].className +=' ' + params.slideActiveClass; } if(params.loop){ var ls=_this.loopedSlides; _this.activeLoopIndex=_this.activeIndex - ls; if(_this.activeLoopIndex >=_this.slides.length - ls * 2){ _this.activeLoopIndex=_this.slides.length - ls * 2 - _this.activeLoopIndex; } if(_this.activeLoopIndex < 0){ _this.activeLoopIndex=_this.slides.length - ls * 2 + _this.activeLoopIndex; } if(_this.activeLoopIndex < 0) _this.activeLoopIndex=0; }else{ _this.activeLoopIndex=_this.activeIndex; } if(params.pagination){ _this.updatePagination(position); }}; _this.createPagination=function (firstInit){ if(params.paginationClickable && _this.paginationButtons){ removePaginationEvents(); } _this.paginationContainer=params.pagination.nodeType ? params.pagination:$$(params.pagination)[0]; if(params.createPagination){ var paginationHTML=''; var numOfSlides=_this.slides.length; var numOfButtons=numOfSlides; if(params.loop) numOfButtons -=_this.loopedSlides * 2; for (var i=0; i < numOfButtons; i++){ paginationHTML +='<' + params.paginationElement + ' class="' + params.paginationElementClass + '">'; } _this.paginationContainer.innerHTML=paginationHTML; } _this.paginationButtons=$$('.' + params.paginationElementClass, _this.paginationContainer); if(!firstInit) _this.updatePagination(); _this.callPlugins('onCreatePagination'); if(params.paginationClickable){ addPaginationEvents(); }}; function removePaginationEvents(){ var pagers=_this.paginationButtons; if(pagers){ for (var i=0; i < pagers.length; i++){ _this.h.removeEventListener(pagers[i], 'click', paginationClick); }} } function addPaginationEvents(){ var pagers=_this.paginationButtons; if(pagers){ for (var i=0; i < pagers.length; i++){ _this.h.addEventListener(pagers[i], 'click', paginationClick); }} } function paginationClick(e){ var index; var target=e.target || e.srcElement; var pagers=_this.paginationButtons; for (var i=0; i < pagers.length; i++){ if(target===pagers[i]) index=i; } if(params.autoplay) _this.stopAutoplay(true); _this.swipeTo(index); } _this.updatePagination=function (position){ if(!params.pagination) return; if(_this.slides.length < 1) return; var activePagers=$$('.' + params.paginationActiveClass, _this.paginationContainer); if(!activePagers) return; var pagers=_this.paginationButtons; if(pagers.length===0) return; for (var i=0; i < pagers.length; i++){ pagers[i].className=params.paginationElementClass; } var indexOffset=params.loop ? _this.loopedSlides:0; if(params.paginationAsRange){ if(!_this.visibleSlides) _this.calcVisibleSlides(position); var visibleIndexes=[]; var j; for (j=0; j < _this.visibleSlides.length; j++){ var visIndex=_this.slides.indexOf(_this.visibleSlides[j]) - indexOffset; if(params.loop && visIndex < 0){ visIndex=_this.slides.length - _this.loopedSlides * 2 + visIndex; } if(params.loop && visIndex >=_this.slides.length - _this.loopedSlides * 2){ visIndex=_this.slides.length - _this.loopedSlides * 2 - visIndex; visIndex=Math.abs(visIndex); } visibleIndexes.push(visIndex); } for (j=0; j < visibleIndexes.length; j++){ if(pagers[visibleIndexes[j]]) pagers[visibleIndexes[j]].className +=' ' + params.paginationVisibleClass; } if(params.loop){ if(pagers[_this.activeLoopIndex]!==undefined){ pagers[_this.activeLoopIndex].className +=' ' + params.paginationActiveClass; }}else{ if(pagers[_this.activeIndex]) pagers[_this.activeIndex].className +=' ' + params.paginationActiveClass; }}else{ if(params.loop){ if(pagers[_this.activeLoopIndex]) pagers[_this.activeLoopIndex].className +=' ' + params.paginationActiveClass + ' ' + params.paginationVisibleClass; }else{ if(pagers[_this.activeIndex]) pagers[_this.activeIndex].className +=' ' + params.paginationActiveClass + ' ' + params.paginationVisibleClass; }} }; _this.calcVisibleSlides=function (position){ var visibleSlides=[]; var _slideLeft=0, _slideSize=0, _slideRight=0; if(isH && _this.wrapperLeft > 0) position=position + _this.wrapperLeft; if(!isH && _this.wrapperTop > 0) position=position + _this.wrapperTop; for (var i=0; i < _this.slides.length; i++){ _slideLeft +=_slideSize; if(params.slidesPerView==='auto') _slideSize=isH ? _this.h.getWidth(_this.slides[i], true, params.roundLengths):_this.h.getHeight(_this.slides[i], true, params.roundLengths); else _slideSize=slideSize; _slideRight=_slideLeft + _slideSize; var isVisibile=false; if(params.visibilityFullFit){ if(_slideLeft >=-position && _slideRight <=-position + containerSize) isVisibile=true; if(_slideLeft <=-position && _slideRight >=-position + containerSize) isVisibile=true; }else{ if(_slideRight > -position && _slideRight <=((-position + containerSize))) isVisibile=true; if(_slideLeft >=-position && _slideLeft < ((-position + containerSize))) isVisibile=true; if(_slideLeft < -position && _slideRight > ((-position + containerSize))) isVisibile=true; } if(isVisibile) visibleSlides.push(_this.slides[i]); } if(visibleSlides.length===0) visibleSlides=[_this.slides[_this.activeIndex]]; _this.visibleSlides=visibleSlides; }; var autoplayTimeoutId, autoplayIntervalId; _this.startAutoplay=function (){ if(_this.support.transitions){ if(typeof autoplayTimeoutId!=='undefined') return false; if(!params.autoplay) return; _this.callPlugins('onAutoplayStart'); if(params.onAutoplayStart) _this.fireCallback(params.onAutoplayStart, _this); autoplay(); }else{ if(typeof autoplayIntervalId!=='undefined') return false; if(!params.autoplay) return; _this.callPlugins('onAutoplayStart'); if(params.onAutoplayStart) _this.fireCallback(params.onAutoplayStart, _this); autoplayIntervalId=setInterval(function (){ if(params.loop){ _this.fixLoop(); _this.swipeNext(true, true); } else if(!_this.swipeNext(true, true)){ if(!params.autoplayStopOnLast) _this.swipeTo(0); else { clearInterval(autoplayIntervalId); autoplayIntervalId=undefined; }} }, params.autoplay); }}; _this.stopAutoplay=function (internal){ if(_this.support.transitions){ if(!autoplayTimeoutId) return; if(autoplayTimeoutId) clearTimeout(autoplayTimeoutId); autoplayTimeoutId=undefined; if(internal && !params.autoplayDisableOnInteraction){ _this.wrapperTransitionEnd(function (){ autoplay(); });} _this.callPlugins('onAutoplayStop'); if(params.onAutoplayStop) _this.fireCallback(params.onAutoplayStop, _this); }else{ if(autoplayIntervalId) clearInterval(autoplayIntervalId); autoplayIntervalId=undefined; _this.callPlugins('onAutoplayStop'); if(params.onAutoplayStop) _this.fireCallback(params.onAutoplayStop, _this); }}; function autoplay(){ autoplayTimeoutId=setTimeout(function (){ if(params.loop){ _this.fixLoop(); _this.swipeNext(true, true); } else if(!_this.swipeNext(true, true)){ if(!params.autoplayStopOnLast) _this.swipeTo(0); else { clearTimeout(autoplayTimeoutId); autoplayTimeoutId=undefined; }} _this.wrapperTransitionEnd(function (){ if(typeof autoplayTimeoutId!=='undefined') autoplay(); });}, params.autoplay); } _this.loopCreated=false; _this.removeLoopedSlides=function (){ if(_this.loopCreated){ for (var i=0; i < _this.slides.length; i++){ if(_this.slides[i].getData('looped')===true) _this.wrapper.removeChild(_this.slides[i]); }} }; _this.createLoop=function (){ if(_this.slides.length===0) return; if(params.slidesPerView==='auto'){ _this.loopedSlides=params.loopedSlides || 1; }else{ _this.loopedSlides=Math.floor(params.slidesPerView) + params.loopAdditionalSlides; } if(_this.loopedSlides > _this.slides.length){ _this.loopedSlides=_this.slides.length; } var slideFirstHTML='', slideLastHTML='', i; var slidesSetFullHTML=''; var numSlides=_this.slides.length; var fullSlideSets=Math.floor(_this.loopedSlides / numSlides); var remainderSlides=_this.loopedSlides % numSlides; for (i=0; i < (fullSlideSets * numSlides); i++){ var j=i; if(i >=numSlides){ var over=Math.floor(i / numSlides); j=i - (numSlides * over); } slidesSetFullHTML +=_this.slides[j].outerHTML; } for (i=0; i < remainderSlides;i++){ slideLastHTML +=addClassToHtmlString(params.slideDuplicateClass, _this.slides[i].outerHTML); } for (i=numSlides - remainderSlides; i < numSlides;i++){ slideFirstHTML +=addClassToHtmlString(params.slideDuplicateClass, _this.slides[i].outerHTML); } var slides=slideFirstHTML + slidesSetFullHTML + wrapper.innerHTML + slidesSetFullHTML + slideLastHTML; wrapper.innerHTML=slides; _this.loopCreated=true; _this.calcSlides(); for (i=0; i < _this.slides.length; i++){ if(i < _this.loopedSlides || i >=_this.slides.length - _this.loopedSlides) _this.slides[i].setData('looped', true); } _this.callPlugins('onCreateLoop'); }; _this.fixLoop=function (){ var newIndex; if(_this.activeIndex < _this.loopedSlides){ newIndex=_this.slides.length - _this.loopedSlides * 3 + _this.activeIndex; _this.swipeTo(newIndex, 0, false); } else if((params.slidesPerView==='auto' && _this.activeIndex >=_this.loopedSlides * 2) || (_this.activeIndex > _this.slides.length - params.slidesPerView * 2)){ newIndex=-_this.slides.length + _this.activeIndex + _this.loopedSlides; _this.swipeTo(newIndex, 0, false); }}; _this.loadSlides=function (){ var slidesHTML=''; _this.activeLoaderIndex=0; var slides=params.loader.slides; var slidesToLoad=params.loader.loadAllSlides ? slides.length:params.slidesPerView * (1 + params.loader.surroundGroups); for (var i=0; i < slidesToLoad; i++){ if(params.loader.slidesHTMLType==='outer') slidesHTML +=slides[i]; else { slidesHTML +='<' + params.slideElement + ' class="' + params.slideClass + '" data-swiperindex="' + i + '">' + slides[i] + ''; }} _this.wrapper.innerHTML=slidesHTML; _this.calcSlides(true); if(!params.loader.loadAllSlides){ _this.wrapperTransitionEnd(_this.reloadSlides, true); }}; _this.reloadSlides=function (){ var slides=params.loader.slides; var newActiveIndex=parseInt(_this.activeSlide().data('swiperindex'), 10); if(newActiveIndex < 0 || newActiveIndex > slides.length - 1) return; _this.activeLoaderIndex=newActiveIndex; var firstIndex=Math.max(0, newActiveIndex - params.slidesPerView * params.loader.surroundGroups); var lastIndex=Math.min(newActiveIndex + params.slidesPerView * (1 + params.loader.surroundGroups) - 1, slides.length - 1); if(newActiveIndex > 0){ var newTransform=-slideSize * (newActiveIndex - firstIndex); _this.setWrapperTranslate(newTransform); _this.setWrapperTransition(0); } var i; if(params.loader.logic==='reload'){ _this.wrapper.innerHTML=''; var slidesHTML=''; for (i=firstIndex; i <=lastIndex; i++){ slidesHTML +=params.loader.slidesHTMLType==='outer' ? slides[i]:'<' + params.slideElement + ' class="' + params.slideClass + '" data-swiperindex="' + i + '">' + slides[i] + ''; } _this.wrapper.innerHTML=slidesHTML; }else{ var minExistIndex=1000; var maxExistIndex=0; for (i=0; i < _this.slides.length; i++){ var index=_this.slides[i].data('swiperindex'); if(index < firstIndex || index > lastIndex){ _this.wrapper.removeChild(_this.slides[i]); }else{ minExistIndex=Math.min(index, minExistIndex); maxExistIndex=Math.max(index, maxExistIndex); }} for (i=firstIndex; i <=lastIndex; i++){ var newSlide; if(i < minExistIndex){ newSlide=document.createElement(params.slideElement); newSlide.className=params.slideClass; newSlide.setAttribute('data-swiperindex', i); newSlide.innerHTML=slides[i]; _this.wrapper.insertBefore(newSlide, _this.wrapper.firstChild); } if(i > maxExistIndex){ newSlide=document.createElement(params.slideElement); newSlide.className=params.slideClass; newSlide.setAttribute('data-swiperindex', i); newSlide.innerHTML=slides[i]; _this.wrapper.appendChild(newSlide); }} } _this.reInit(true); }; function makeSwiper(){ _this.calcSlides(); if(params.loader.slides.length > 0 && _this.slides.length===0){ _this.loadSlides(); } if(params.loop){ _this.createLoop(); } _this.init(); initEvents(); if(params.pagination){ _this.createPagination(true); } if(params.loop || params.initialSlide > 0){ _this.swipeTo(params.initialSlide, 0, false); }else{ _this.updateActiveSlide(0); } if(params.autoplay){ _this.startAutoplay(); } _this.centerIndex=_this.activeIndex; if(params.onSwiperCreated) _this.fireCallback(params.onSwiperCreated, _this); _this.callPlugins('onSwiperCreated'); } makeSwiper(); }; Swiper.prototype={ plugins:{}, wrapperTransitionEnd:function (callback, permanent){ 'use strict'; var a=this, el=a.wrapper, events=['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'], i; function fireCallBack(e){ if(e.target!==el) return; callback(a); if(a.params.queueEndCallbacks) a._queueEndCallbacks=false; if(!permanent){ for (i=0; i < events.length; i++){ a.h.removeEventListener(el, events[i], fireCallBack); }} } if(callback){ for (i=0; i < events.length; i++){ a.h.addEventListener(el, events[i], fireCallBack); }} }, getWrapperTranslate:function (axis){ 'use strict'; var el=this.wrapper, matrix, curTransform, curStyle, transformMatrix; if(typeof axis==='undefined'){ axis=this.params.mode==='horizontal' ? 'x':'y'; } if(this.support.transforms && this.params.useCSS3Transforms){ curStyle=window.getComputedStyle(el, null); if(window.WebKitCSSMatrix){ transformMatrix=new WebKitCSSMatrix(curStyle.webkitTransform==='none' ? '':curStyle.webkitTransform); }else{ transformMatrix=curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); matrix=transformMatrix.toString().split(','); } if(axis==='x'){ if(window.WebKitCSSMatrix) curTransform=transformMatrix.m41; else if(matrix.length===16) curTransform=parseFloat(matrix[12]); else curTransform=parseFloat(matrix[4]); } if(axis==='y'){ if(window.WebKitCSSMatrix) curTransform=transformMatrix.m42; else if(matrix.length===16) curTransform=parseFloat(matrix[13]); else curTransform=parseFloat(matrix[5]); }}else{ if(axis==='x') curTransform=parseFloat(el.style.left, 10) || 0; if(axis==='y') curTransform=parseFloat(el.style.top, 10) || 0; } return curTransform || 0; }, setWrapperTranslate:function (x, y, z){ 'use strict'; var es=this.wrapper.style, coords={x:0, y:0, z:0}, translate; if(arguments.length===3){ coords.x=x; coords.y=y; coords.z=z; }else{ if(typeof y==='undefined'){ y=this.params.mode==='horizontal' ? 'x':'y'; } coords[y]=x; } if(this.support.transforms && this.params.useCSS3Transforms){ translate=this.support.transforms3d ? 'translate3d(' + coords.x + 'px, ' + coords.y + 'px, ' + coords.z + 'px)':'translate(' + coords.x + 'px, ' + coords.y + 'px)'; es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=translate; }else{ es.left=coords.x + 'px'; es.top=coords.y + 'px'; } this.callPlugins('onSetWrapperTransform', coords); if(this.params.onSetWrapperTransform) this.fireCallback(this.params.onSetWrapperTransform, this, coords); }, setWrapperTransition:function (duration){ 'use strict'; var es=this.wrapper.style; es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=(duration / 1000) + 's'; this.callPlugins('onSetWrapperTransition', {duration:duration});if(this.params.onSetWrapperTransition) this.fireCallback(this.params.onSetWrapperTransition, this, duration); }, h:{ getWidth:function (el, outer, round){ 'use strict'; var width=window.getComputedStyle(el, null).getPropertyValue('width'); var returnWidth=parseFloat(width); if(isNaN(returnWidth) || width.indexOf('%') > 0 || returnWidth < 0){ returnWidth=el.offsetWidth - parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-left')) - parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-right')); } if(outer) returnWidth +=parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-right')); if(round) return Math.ceil(returnWidth); else return returnWidth; }, getHeight:function (el, outer, round){ 'use strict'; if(outer) return el.offsetHeight; var height=window.getComputedStyle(el, null).getPropertyValue('height'); var returnHeight=parseFloat(height); if(isNaN(returnHeight) || height.indexOf('%') > 0 || returnHeight < 0){ returnHeight=el.offsetHeight - parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-top')) - parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-bottom')); } if(outer) returnHeight +=parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue('padding-bottom')); if(round) return Math.ceil(returnHeight); else return returnHeight; }, getOffset:function (el){ 'use strict'; var box=el.getBoundingClientRect(); var body=document.body; var clientTop=el.clientTop || body.clientTop || 0; var clientLeft=el.clientLeft || body.clientLeft || 0; var scrollTop=window.pageYOffset || el.scrollTop; var scrollLeft=window.pageXOffset || el.scrollLeft; if(document.documentElement && !window.pageYOffset){ scrollTop=document.documentElement.scrollTop; scrollLeft=document.documentElement.scrollLeft; } return { top:box.top + scrollTop - clientTop, left:box.left + scrollLeft - clientLeft };}, windowWidth:function (){ 'use strict'; if(window.innerWidth) return window.innerWidth; else if(document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth; }, windowHeight:function (){ 'use strict'; if(window.innerHeight) return window.innerHeight; else if(document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight; }, windowScroll:function (){ 'use strict'; if(typeof pageYOffset!=='undefined'){ return { left:window.pageXOffset, top:window.pageYOffset };} else if(document.documentElement){ return { left:document.documentElement.scrollLeft, top:document.documentElement.scrollTop };}}, addEventListener:function (el, event, listener, useCapture){ 'use strict'; if(typeof useCapture==='undefined'){ useCapture=false; } if(el.addEventListener){ el.addEventListener(event, listener, useCapture); } else if(el.attachEvent){ el.attachEvent('on' + event, listener); }}, removeEventListener:function (el, event, listener, useCapture){ 'use strict'; if(typeof useCapture==='undefined'){ useCapture=false; } if(el.removeEventListener){ el.removeEventListener(event, listener, useCapture); } else if(el.detachEvent){ el.detachEvent('on' + event, listener); }} }, setTransform:function (el, transform){ 'use strict'; var es=el.style; es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transform; }, setTranslate:function (el, translate){ 'use strict'; var es=el.style; var pos={ x:translate.x || 0, y:translate.y || 0, z:translate.z || 0 }; var transformString=this.support.transforms3d ? 'translate3d(' + (pos.x) + 'px,' + (pos.y) + 'px,' + (pos.z) + 'px)':'translate(' + (pos.x) + 'px,' + (pos.y) + 'px)'; es.webkitTransform=es.MsTransform=es.msTransform=es.MozTransform=es.OTransform=es.transform=transformString; if(!this.support.transforms){ es.left=pos.x + 'px'; es.top=pos.y + 'px'; }}, setTransition:function (el, duration){ 'use strict'; var es=el.style; es.webkitTransitionDuration=es.MsTransitionDuration=es.msTransitionDuration=es.MozTransitionDuration=es.OTransitionDuration=es.transitionDuration=duration + 'ms'; }, support:{ touch:(window.Modernizr && Modernizr.touch===true) || (function (){ 'use strict'; return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch); })(), transforms3d:(window.Modernizr && Modernizr.csstransforms3d===true) || (function (){ 'use strict'; var div=document.createElement('div').style; return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div); })(), transforms:(window.Modernizr && Modernizr.csstransforms===true) || (function (){ 'use strict'; var div=document.createElement('div').style; return ('transform' in div || 'WebkitTransform' in div || 'MozTransform' in div || 'msTransform' in div || 'MsTransform' in div || 'OTransform' in div); })(), transitions:(window.Modernizr && Modernizr.csstransitions===true) || (function (){ 'use strict'; var div=document.createElement('div').style; return ('transition' in div || 'WebkitTransition' in div || 'MozTransition' in div || 'msTransition' in div || 'MsTransition' in div || 'OTransition' in div); })(), classList:(function (){ 'use strict'; var div=document.createElement('div'); return 'classList' in div; })() }, browser:{ ie8:(function (){ 'use strict'; var rv=-1; if(navigator.appName==='Microsoft Internet Explorer'){ var ua=navigator.userAgent; var re=new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/); if(re.exec(ua)!==null) rv=parseFloat(RegExp.$1); } return rv!==-1 && rv < 9; })(), ie10:window.navigator.msPointerEnabled, ie11:window.navigator.pointerEnabled }}; if(window.jQuery || window.Zepto){ (function ($){ 'use strict'; $.fn.swiper=function (params){ var firstInstance; this.each(function (i){ var that=$(this); var s=new Swiper(that[0], params); if(!i) firstInstance=s; that.data('swiper', s); });return firstInstance; };})(window.jQuery || window.Zepto); } if(typeof(module)!=='undefined'){ module.exports=Swiper; } else if(typeof define==='function' && define.amd){ define([], function (){ 'use strict'; return Swiper; });}; ////////////////////////////////////////////////////////////////////////////////// (function ($){ var scripts=document.getElementsByTagName("script"); var last=scripts[scripts.length-1].src.lastIndexOf('/'); var scriptPath=scripts[scripts.length-1].src.slice(0,last); $(document).ready(function (){ $(".woocommerce .product .thumbnails a.cloud-zoom-gallery").unbind('click'); $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom(); });function format(str){ for (var i=1; i < arguments.length; i++){ str=str.replace('%' + (i - 1), arguments[i]); } return str; } function CloudZoom(jWin, opts){ var sImg=$('img', jWin); var img1; var img2; var zoomDiv=null; var $mouseTrap=null; var lens=null; var $tint=null; var softFocus=null; var $ie6Fix=null; var zoomImage; var controlTimer=0; var cw, ch; var destU=0; var destV=0; var currV=0; var currU=0; var filesLoaded=0; var mx, my; var ctx=this, zw; setTimeout(function (){ if($mouseTrap===null){ var w=jWin.width(); jWin.parent().append(format('
    Loading...
    ', w / 3, (w / 2) - (w / 6))); $('cloud-zoom-loading', jWin.parent()).css('opacity', 0.5) }}, 200); var ie6FixRemove=function (){ if($ie6Fix!==null){ $ie6Fix.remove(); $ie6Fix=null; }}; this.removeBits=function (){ if(lens){ lens.remove(); lens=null; } if($tint){ $tint.remove(); $tint=null; } if(softFocus){ softFocus.remove(); softFocus=null; } ie6FixRemove(); $('.cloud-zoom-loading', jWin.parent()).remove(); }; this.destroy=function (){ jWin.data('zoom', null); if($mouseTrap){ $mouseTrap.unbind(); $mouseTrap.remove(); $mouseTrap=null; } if(zoomDiv){ zoomDiv.remove(); zoomDiv=null; } this.removeBits(); }; this.fadedOut=function (){ if(zoomDiv){ zoomDiv.remove(); zoomDiv=null; } this.removeBits(); }; this.controlLoop=function (){ if(lens){ var x=(mx - sImg.offset().left - (cw * 0.5)) >> 0; var y=(my - sImg.offset().top - (ch * 0.5)) >> 0; if(x < 0){ x=0; } else if(x > (sImg.outerWidth() - cw)){ x=(sImg.outerWidth() - cw); } if(y < 0){ y=0; } else if(y > (sImg.outerHeight() - ch)){ y=(sImg.outerHeight() - ch); } lens.css({ left:x, top:y });lens.css('background-position', (-x) + 'px ' + (-y) + 'px'); destU=(((x) / sImg.outerWidth()) * zoomImage.width) >> 0; destV=(((y) / sImg.outerHeight()) * zoomImage.height) >> 0; currU +=(destU - currU) / opts.smoothMove; currV +=(destV - currV) / opts.smoothMove; zoomDiv.css('background-position', (-(currU >> 0) + 'px ') + (-(currV >> 0) + 'px')); } controlTimer=setTimeout(function (){ ctx.controlLoop(); }, 30); }; this.init2=function (img, id){ filesLoaded++; if(id===1){ zoomImage=img; } if(filesLoaded===2){ this.init(); }}; this.init=function (){ $('.cloud-zoom-loading', jWin.parent()).remove(); var $m=$("
    "); $mouseTrap=jWin.parent().append($m).find(':last'); $mouseTrap=$('.mousetrap',jWin.parent()); $mouseTrap.css({ width:sImg.outerWidth(), height:sImg.outerHeight(), top:0, left:0, position:'absolute', zIndex:999 });$mouseTrap.bind('mousemove', this, function (event){ mx=event.pageX; my=event.pageY; });$mouseTrap.bind('mouseleave', this, function (event){ clearTimeout(controlTimer); if(lens){ lens.fadeOut(299); } if($tint){ $tint.fadeOut(299); } if(softFocus){ softFocus.fadeOut(299); } zoomDiv.fadeOut(300, function (){ ctx.fadedOut(); });return false; });$mouseTrap.bind('mouseenter', this, function (event){ mx=event.pageX; my=event.pageY; zw=event.data; if(zoomDiv){ zoomDiv.stop(true, false); zoomDiv.remove(); } var xPos=opts.adjustX, yPos=opts.adjustY; var siw=sImg.outerWidth(); var sih=sImg.outerHeight(); var w=opts.zoomWidth; var h=opts.zoomHeight; if(opts.zoomWidth=='auto'){ w=siw; } if(opts.zoomHeight=='auto'){ h=sih; } var appendTo=jWin.parent(); switch (opts.position){ case 'top': yPos -=h; break; case 'right': xPos +=siw; break; case 'bottom': yPos +=sih; break; case 'left': xPos -=w; break; case 'inside': w=siw; h=sih; break; default: appendTo=$('#' + opts.position); if(!appendTo.length){ appendTo=jWin; xPos +=siw; yPos +=sih; }else{ w=appendTo.innerWidth(); h=appendTo.innerHeight(); }} if(opts.position=='inside'){ zoomDiv=appendTo.append(format('', xPos, yPos, w, h, zoomImage.src)).find(':last'); }else{ zoomDiv=appendTo.append(format('', xPos, yPos-1, w+3, h+2, zoomImage.src)).find(':last'); } zoomDiv=$('.cloud-zoom-big',appendTo); if(sImg.attr('title') && opts.showTitle){ zoomDiv.append(format('
    %0
    ', sImg.attr('title'))); $('.cloud-zoom-title', zoomDiv).css('opacity', opts.titleOpacity); } if($.browser.msie && $.browser.version < 7){ $ie6Fix=$('').css({ position:"absolute", left:xPos, top:yPos, zIndex:99, width:w, height:h }).insertBefore(zoomDiv); } zoomDiv.fadeIn(500); if(lens){ lens.remove(); lens=null; } cw=(sImg.outerWidth() / zoomImage.width) * zoomDiv.width(); ch=(sImg.outerHeight() / zoomImage.height) * zoomDiv.height(); lens=jWin.append(format("", cw, ch)).find(':last'); lens=$('.cloud-zoom-lens',jWin); $mouseTrap.css('cursor', lens.css('cursor')); var noTrans=false; if(opts.tint){ lens.css('background', 'url("' + sImg.attr('src') + '")'); $tint=jWin.append(format('